export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
      { path: '/user/register', component: './User/Register' },
      { path: '/user/register-result', component: './User/RegisterResult' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    // authority: ['admin', 'user'],
    routes: [
      // 组织管理
      { path: '/', redirect: '/organization' },
      {
        path: '/organization',
        name: 'organization',
        icon: 'dashboard',
        routes: [
          { path: '/organization', redirect: '/organization/user' },

          {
            path: '/organization/user',
            name: 'user',
            component: './Organization/UserManage/index.js',
          },
          {
            path: '/organization/dept',
            name: 'dept',
            component: './Organization/Dept/index.js',
          },
          {
            path: '/organization/permission',
            name: 'permission',
            component: './Organization/Permission/index.js',
          },
          {
            path: '/organization/Role',
            name: 'role',
            routes: [
              {
                path: '/organization/Role',
                name: 'role',
                component: './Organization/Role/index.js',
              },
            ],
          },
        ],
      },
      {
        path: '/preloan',
        name: 'preloan',
        icon: 'preloan',
        routes: [
          { path: '/preloan', redirect: '/preloan/enterprise' },

          {
            path: '/preloan/enterprise',
            name: 'enterprise',
            routes: [
              {
                path: '/preloan/enterprise',
                name: 'enterprise',
                component: './PreLoan/Company/index.js',
              },
              {
                path: '/preloan/enterprise/create',
                name: 'stepform',
                component: './PreLoan/Company/Forms/StepForm',
                routes: [
                  {
                    path: '/preloan/enterprise/create',
                    redirect: '/preloan/enterprise/create/step1',
                  },
                  {
                    path: '/preloan/enterprise/create/step1',
                    name: 'step1',
                    component: './PreLoan/Company/Forms/StepForm/Step1',
                  },
                  {
                    path: '/preloan/enterprise/create/step2',
                    name: 'step2',
                    component: './PreLoan/Company/Forms/StepForm/Step2',
                  },
                  {
                    path: '/preloan/enterprise/create/step3',
                    name: 'step3',
                    component: './PreLoan/Company/Forms/StepForm/Step3',
                  },
                  {
                    path: '/preloan/enterprise/create/step4',
                    name: 'step4',
                    component: './PreLoan/Company/Forms/StepForm/Step4',
                  },
                  {
                    path: '/preloan/enterprise/create/step5',
                    name: 'step5',
                    component: './PreLoan/Company/Forms/StepForm/Step5',
                  },
                ],
              },
            ],
          },
          {
            path: '/preloan/account',
            name: 'applyInfos',
            component: './PreLoan/Account/index.js',
          },
          {
            path: '/preloan/credit',
            name: 'credit',
            component: './PreLoan/Credit/index.js',
          },
          {
            path: '/preloan/ca',
            name: 'ca',
            component: './PreLoan/ca/index.js',
          },
          {
            path: '/preloan/apply',
            name: 'apply',
            component: './PreLoan/apply/index.js',
          },
          {
            path: '/preloan/apply/applyInfos',
            name: 'applyInfos',
            component: './PreLoan/apply/info.js',
          },
        ],
      },
      {
        path: '/app',
        name: 'app',
        routes: [
          { path: '/app', redirect: '/app/brand' },

          {
            path: '/app/brand',
            name: 'brandList',
            component: './app/BrandManage/index.js',
          },
          {
            path: '/app/merchant',
            name: 'merchant',
            component: './app/MerchantManage/index.js',
          },
          {
            path: '/app/project',
            name: 'project',
            routes: [
              {
                path: '/app/project',
                name: 'project',
                component: './app/ProjectManage/index.js',
              },
              {
                path: '/app/project/packing',
                name: 'packing',
                component: './app/ProjectManage/packing/index.js',
              },
            ],
          },
          {
            path: '/app/banklimit',
            name: 'banklimit',
            component: './app/BankLimit/index.js',
          },

          {
            path: '/app/product',
            name: 'product',
            component: './app/Product/index.js',
          },

          {
            path: '/app/debt',
            name: 'debt',
            component: './app/Debt/index.js',
          },
        ],
      },
      {
        path: '/inloan',
        name: 'inloan',
        routes: [
          { path: '/inloan', redirect: '/inloan/loan' },

          {
            path: '/inloan/loan',
            name: 'loan',
            component: './Inloan/Loan/index.js',
          },
          {
            path: '/inloan/merchant',
            name: 'Merchant',
            routes: [
              {
                path: '/inloan/merchant',
                name: 'Merchant',
                component: './Inloan/Merchant/index.js',
              },
              {
                path: '/inloan/merchant/desc',
                name: 'Merchant',
                component: './Inloan/Merchant/descView.js',
              },
            ],
          },
          {
            path: '/inloan/repay',
            name: 'Repay',
            component: './Inloan/Repay/index.js',
          },
          {
            path: '/inloan/repayment',
            name: 'Repayment',
            component: './Inloan/Repayment/index.js',
          },
          {
            path: '/inloan/compensatory',
            name: 'Compensatory',
            component: './Inloan/Compensatory/index.js',
          },
        ],
      },
      {
        path: '/business',
        name: 'business',
        routes: [
          { path: '/business', redirect: '/business/trade' },
          {
            path: '/business/trade',
            name: 'Trade',
            component: './Business/Trade/index.js',
          },
          {
            path: '/business/rewardLog',
            name: 'Risk',
            component: './Business/RewardLog/index.js',
          },
          {
            path: '/business/assessment',
            name: 'Assessment',
            component: './Business/Assessment/index.js',
          },
          {
            path: '/business/invite',
            name: 'Invite',
            component: './Business/Invite/index.js',
          },
          {
            path: '/business/notice',
            name: 'notice',
            component: './Business/Notice/index.js',
          },
          {
            path: '/business/reward',
            name: 'Reward',
            component: './Business/Reward/index.js',
            exact: true,
          },
          {
            path: '/business/coupon',
            name: 'coupon',
            routes: [
              {
                path: '/business/coupon',
                name: 'coupon',
                component: './Business/Coupon/index.js',
              },
              {
                path: '/business/coupon/create',
                name: 'create',
                component: './Business/Coupon/createForm.js',
              },
            ],
          },

          {
            path: '/business/banner',
            name: 'Banner',
            component: './Business/Banner/index.js',
          },
          {
            path: '/business/bid',
            name: 'Bid',
            component: './Business/Bid/index.js',
          },
          {
            path: '/business/risk/education',
            name: 'Risk',
            component: './Business/Risk/index.js',
          },
          {
            path: '/business/platuser',
            name: 'Platuser',
            component: './Business/Platuser/index.js',
          },
          {
            path: '/business/report',
            name: 'Report',
            component: './Business/Report/index.js',
          },
          {
            component: '404',
          },
        ],
      },
      {
        path: '/account',
        name: 'account',
        routes: [
          { path: '/account', redirect: '/account/account' },
          {
            path: '/account/account',
            name: 'AccountManage',
            component: './FirmAccount/AccountManage/index.js',
          },
          {
            path: '/account/info',
            name: 'AccountManage',
            component: './FirmAccount/Account/index.js',
          },
          {
            path: '/account/repayment',
            name: 'Repayment',
            component: './FirmAccount/Repayment/index.js',
          },
          {
            path: '/account/apply',
            name: 'Apply',
            component: './FirmAccount/Apply/index.js',
          },
        ],
      },
      // // forms
      // {
      //   path: '/form',
      //   icon: 'form',
      //   name: 'form',
      //   routes: [
      //     {
      //       path: '/form/basic-form',
      //       name: 'basicform',
      //       component: './packing/BasicForm',
      //     },
      //     {
      //       path: '/form/step-form',
      //       name: 'stepform',
      //       component: './packing/packing',
      //       routes: [
      //         {
      //           path: '/form/step-form',
      //           redirect: '/form/step-form/info',
      //         },
      //         {
      //           path: '/form/step-form/info',
      //           name: 'info',
      //           component: './packing/packing/Step1',
      //         },
      //         {
      //           path: '/form/step-form/confirm',
      //           name: 'confirm',
      //           component: './packing/packing/Step2',
      //         },
      //         {
      //           path: '/form/step-form/result',
      //           name: 'result',
      //           component: './packing/packing/Step3',
      //         },
      //       ],
      //     },
      //     {
      //       path: '/form/advanced-form',
      //       name: 'advancedform',
      //       authority: ['admin'],
      //       component: './packing/AdvancedForm',
      //     },
      //   ],
      // },
      // // list
      // {
      //   path: '/list',
      //   icon: 'table',
      //   name: 'list',
      //   routes: [
      //     {
      //       path: '/list/table-list',
      //       name: 'searchtable',
      //       component: './List/TableList',
      //     },
      //     {
      //       path: '/list/basic-list',
      //       name: 'basiclist',
      //       component: './List/BasicList',
      //     },
      //     {
      //       path: '/list/card-list',
      //       name: 'cardlist',
      //       component: './List/CardList',
      //     },
      //     {
      //       path: '/list/search',
      //       name: 'searchlist',
      //       component: './List/List',
      //       routes: [
      //         {
      //           path: '/list/search',
      //           redirect: '/list/search/articles',
      //         },
      //         {
      //           path: '/list/search/articles',
      //           name: 'articles',
      //           component: './List/Articles',
      //         },
      //         {
      //           path: '/list/search/projects',
      //           name: 'projects',
      //           component: './List/Projects',
      //         },
      //         {
      //           path: '/list/search/applications',
      //           name: 'applications',
      //           component: './List/Applications',
      //         },
      //       ],
      //     },
      //   ],
      // },
      // {
      //   path: '/profile',
      //   name: 'profile',
      //   icon: 'profile',
      //   routes: [
      //     // profile
      //     {
      //       path: '/profile/basic',
      //       name: 'basic',
      //       component: './Profile/BasicProfile',
      //     },
      //     {
      //       path: '/profile/advanced',
      //       name: 'advanced',
      //       authority: ['admin'],
      //       component: './Profile/AdvancedProfile',
      //     },
      //   ],
      // },
      // {
      //   name: 'result',
      //   icon: 'check-circle-o',
      //   path: '/result',
      //   routes: [
      //     // result
      //     {
      //       path: '/result/success',
      //       name: 'success',
      //       component: './Result/Success',
      //     },
      //     { path: '/result/fail', name: 'fail', component: './Result/Error' },
      //   ],
      // },
      // {
      //   name: 'exception',
      //   icon: 'warning',
      //   path: '/exception',
      //   routes: [
      //     // exception
      //     {
      //       path: '/exception/403',
      //       name: 'not-permission',
      //       component: './Exception/403',
      //     },
      //     {
      //       path: '/exception/404',
      //       name: 'not-find',
      //       component: './Exception/404',
      //     },
      //     {
      //       path: '/exception/500',
      //       name: 'server-error',
      //       component: './Exception/500',
      //     },
      //     {
      //       path: '/exception/trigger',
      //       name: 'trigger',
      //       hideInMenu: true,
      //       component: './Exception/TriggerException',
      //     },
      //   ],
      // },
      // {
      //   name: 'account',
      //   icon: 'user',
      //   path: '/account',
      //   routes: [
      //     {
      //       path: '/account/center',
      //       name: 'center',
      //       component: './Account/Center/Center',
      //       routes: [
      //         {
      //           path: '/account/center',
      //           redirect: '/account/center/articles',
      //         },
      //         {
      //           path: '/account/center/articles',
      //           component: './Account/Center/Articles',
      //         },
      //         {
      //           path: '/account/center/applications',
      //           component: './Account/Center/Applications',
      //         },
      //         {
      //           path: '/account/center/projects',
      //           component: './Account/Center/Projects',
      //         },
      //       ],
      //     },
      //     {
      //       path: '/account/settings',
      //       name: 'settings',
      //       component: './Account/Settings/Info',
      //       routes: [
      //         {
      //           path: '/account/settings',
      //           redirect: '/account/settings/base',
      //         },
      //         {
      //           path: '/account/settings/base',
      //           component: './Account/Settings/BaseView',
      //         },
      //         {
      //           path: '/account/settings/security',
      //           component: './Account/Settings/SecurityView',
      //         },
      //         {
      //           path: '/account/settings/binding',
      //           component: './Account/Settings/BindingView',
      //         },
      //         {
      //           path: '/account/settings/notification',
      //           component: './Account/Settings/NotificationView',
      //         },
      //       ],
      //     },
      //   ],
      // },
      {
        component: '404',
      },
    ],
  },
];
